package work1.bank;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        Bank bank = new Bank();
        bank.setbName("招商银行");
        bank.welcome();
        while (true){
            int s=in.nextInt();
            switch (s){
                case 1:
                    String a=in.next();
                    int b=in.nextInt();
                    int c=in.nextInt();
                    bank.open(a,b,c);
                    bank.tip();
                    break;
                case 2:
                    int m=in.nextInt();
                    bank.deposit(m);
                    bank.tip();
                    break;
                case 3:
                    int password=in.nextInt();
                    if (bank.psw(password)){
                        bank.out(in.nextInt());
                    }
                    else {
                        System.out.println();
                        System.out.print("密码输入错误！");
                    }
                    break;
                case 4:
                    bank.unwelcome();
                    break;
                    default:
                        System.out.println("请输入1-4");
            }
            if (s==4){
                break;
            }
        }
    }
}
